<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1">
  <title id="at136704">ALTER PROTOCOL</title>
  <body>
    <p id="sql_command_desc">Changes the definition of a protocol.</p>
    <section id="section2">
      <title>Synopsis</title>
      <codeblock id="sql_command_synopsis">ALTER PROTOCOL <varname>name</varname> RENAME TO <varname>newname</varname>

ALTER PROTOCOL <varname>name</varname> OWNER TO <varname>newowner</varname></codeblock>
    </section>
    <section id="section3">
      <title>Description</title>
      <p><codeph>ALTER PROTOCOL</codeph> changes the definition of a protocol. Only the protocol
        name or owner can be altered.</p>
      <p>You must own the protocol to use <codeph>ALTER PROTOCOL</codeph>. To alter the owner, you
        must also be a direct or indirect member of the new owning role, and that role must have
          <codeph>CREATE</codeph> privilege on schema of the conversion. </p>
      <p>These restrictions are in place to ensure that altering the owner only makes changes that
        could by made by dropping and recreating the protocol. Note that a superuser can alter
        ownership of any protocol. </p>
    </section>
    <section id="section4">
      <title>Parameters</title>
      <parml>
        <plentry>
          <pt><varname>name</varname></pt>
          <pd>The name (optionally schema-qualified) of an existing protocol.</pd>
        </plentry>
        <plentry>
          <pt><varname>newname</varname></pt>
          <pd>The new name of the protocol. </pd>
        </plentry>
        <plentry>
          <pt><varname>newowner</varname></pt>
          <pd>The new owner of the protocol. </pd>
        </plentry>
      </parml>
    </section>
    <section id="section5">
      <title>Examples</title>
      <p>To rename the conversion <codeph>GPDBauth</codeph> to
        <codeph>GPDB_authentication</codeph>:</p>
      <codeblock>ALTER PROTOCOL GPDBauth RENAME TO GPDB_authentication;</codeblock>
      <p>To change the owner of the conversion <codeph>GPDB_authentication</codeph> to
          <codeph>joe</codeph>:</p>
      <codeblock>ALTER PROTOCOL GPDB_authentication OWNER TO joe;</codeblock>
    </section>
    <section id="section6">
      <title>Compatibility</title>
      <p>There is no <codeph>ALTER PROTOCOL</codeph> statement in the SQL standard. </p>
    </section>
    <section>
      <title>See Also</title>
      <p><codeph><xref href="CREATE_EXTERNAL_TABLE.xml#topic1"/></codeph>, <codeph><xref
            href="CREATE_PROTOCOL.xml#topic1"/></codeph>, <codeph><xref
            href="DROP_PROTOCOL.xml#topic1"/></codeph></p>
    </section>
  </body>
</topic>
